//Page Object
import route from "../../utils/route"

Page({
    data: {
        title: String
    },
    //options(Object)
    onLoad: function (options) {
        let title = JSON.parse(options.param)
        this.setData({ title: title.pageName })

        var curPages = getCurrentPages();
        console.log("当前页面wallet=>路由栈:");
        console.log(curPages);
    },
    onReady: function () {
    },
    onShow: function () {

    },
    onHide: function () {

    },
    onUnload: function () {

    },
    onPullDownRefresh: function () {

    },
    onReachBottom: function () {

    },
    onShareAppMessage: function () {

    },
    onPageScroll: function () {

    },
    //item(index,pagePath,text)
    onTabItemTap: function (item) {

    },
    //****************************************************** 内部方法 ******************************************************//

    // 导航条事件
    _navAction: function (param) {
        if (param.detail.tag == 'left') {
            // 返回上级页面,同时返回新手机号码!
            route.pop({ userName: "189****009" })
        }
    },

    // 点击事件
    _click: function () {
        route.push("../../pages/wallet_detail_1/wallet_detail_1", JSON.stringify({ title: '123456' }), null, null, () => { console.log("跳转钱包页1----ok") })
    }


});